function Tab(el){
    this.el=document.querySelector(el)
    this.init()
}
Tab.prototype.init=function(){
    this.mouseOver()
}
Tab.prototype.mouseOver=function(){
    // 获取所有li
    // 遍历
let ulLiObjs=this.el.querySelectorAll('ul li')
ulLiObjs.forEach((item,i) => {
    item.onmouseover = () => {
        this.tbTitle(ulLiObjs,i)
        this.tbContent(i)
    }   
})
}
Tab.prototype.tbTitle=function(ulLiObjs,i){
    this.el.querySelector('ul li.active').className=''
    ulLiObjs[i].className='active'
}
Tab.prototype.tbContent=function(i){
    this.el.querySelector('ol li.active').className=''
    let olLiObj=this.el.querySelectorAll('ol li')
    olLiObj[i].className='active'
}